﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="signup.aspx.cs" Inherits="signup" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
    <style type="text/css">
        .style1
        {
            width: 100%;
        }
        .style2
        {
            width: 100%;
            height: 70px;
        }
        .style3
        {
            height: 70px;
        }
        .style4
        {
            width: 100%;
            height: 26px;
        }
        .style5
        {
            height: 26px;
        }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    

    <div style="width: 80%; border:'1 solid'; margin:'10px auto';">
        <table title="加入會員">
        <thead align="left" valign="middle">
        <tr>
            <td colspan ='2' valign="middle" style="font-size:'larger';">加入會員</td>
        </tr>
        </thead>

        <tbody>
            <tr>
                <td class="style2"><asp:Label ID="Label1" runat="server" Text="帳號："></asp:Label></td>
                <td class="style3"><asp:TextBox ID="MAccountTextBox" runat="server" Width="200px"></asp:TextBox>
                    <asp:RegularExpressionValidator ID="MAccountRegularExpressionValidator"  Display="Dynamic" Font-Bold="True" ForeColor="Red"
                        runat="server" ControlToValidate="MAccountTextBox" 
                        ErrorMessage="帳號長度必須介於4~15個字" ToolTip="帳號長度必須介於4~15個字" 
                        ValidationExpression="[\w\d_]{4,15}"></asp:RegularExpressionValidator>
                </td>
            </tr>
            <tr>
                <td class="style1"><asp:Label ID="Label2" runat="server" Text="密碼："></asp:Label></td>
                <td><asp:TextBox ID="MPasswordTextBox" runat="server" TextMode="Password" 
                        Width="200px"></asp:TextBox>
                    <asp:RegularExpressionValidator ID="MPasswordRegularExpressionValidator"  Display="Dynamic" Font-Bold="True" ForeColor="Red"
                        runat="server" ControlToValidate="MPasswordTextBox" 
                        ErrorMessage="密碼長度必須介於4~15個字" ValidationExpression="[\w\d_]{4,15}"></asp:RegularExpressionValidator>
                </td>
            </tr>
            
            <tr>
                <td class="style1"><asp:Label ID="Label4" runat="server" Text="再次輸入密碼："></asp:Label></td>
                <td><asp:TextBox ID="RepeatPasswordTextBox" runat="server" TextMode="Password" 
                        Width="200px"></asp:TextBox>
                    <asp:CompareValidator ID="PasswordCompareValidator" runat="server"  Display="Dynamic" Font-Bold="True" ForeColor="Red"
                        ControlToCompare="RepeatPasswordTextBox" ControlToValidate="MPasswordTextBox" 
                        ErrorMessage="CompareValidator">您2次輸入的密碼不一致</asp:CompareValidator>
                </td>
            </tr>
            <tr>
                <td class="style1"><asp:Label ID="Label3" runat="server" Text="現在居住地："></asp:Label></td>
                <td><asp:TextBox ID="MNowLiveInTextBox" runat="server" Width="200px"></asp:TextBox>
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" 
                        ControlToValidate="MNowLiveInTextBox" ErrorMessage="請填入居住地"></asp:RequiredFieldValidator>
                </td>
            </tr>
            <tr>
                <td class="style4"><asp:Label ID="Label5" runat="server" Text="姓名/公司行號："></asp:Label></td>
                <td class="style5"><asp:TextBox ID="MNameTextBox" runat="server" Width="199px"></asp:TextBox>
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" 
                        ControlToValidate="MNameTextBox" ErrorMessage="此欄不能為空"></asp:RequiredFieldValidator>
                </td>
            </tr>
            <tr>
                <td class="style1"><asp:Label ID="Label6" runat="server" Text="電話："></asp:Label></td>
                <td><asp:TextBox ID="MTelTextBox" runat="server" Width="200px" 
                        AutoCompleteType="BusinessPhone"></asp:TextBox>
                    <br />
                    <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" 
                        ControlToValidate="MTelTextBox" Display="Dynamic" Font-Bold="True" ForeColor="Red" ErrorMessage="手機格式不正確" 
                        ValidationExpression="^09\d{2}-?\d{3}-?\d{3}$"></asp:RegularExpressionValidator>
                </td>
            </tr>
            <tr>
                <td class="style1"><asp:Label ID="Label7" runat="server" Text="職業："></asp:Label></td>
                <td><asp:TextBox ID="MWorkTextBox" runat="server" Width="200px"></asp:TextBox></td>
            </tr>
            <tr>
                <td class="style1"><asp:Label ID="Label9" runat="server" Text="所屬公司："></asp:Label></td>
                <td><asp:TextBox ID="MCompanyTextBox" runat="server" Width="200px"></asp:TextBox></td>
            </tr>
            <tr>
                <td  align="center" valign="middle" class="style1"><asp:Button ID="SubmitButton" 
                        runat="server" Height="35px" Text="送出" Width="60px" 
                        onclick="SubmitButton_Click"/>
                </td>
                <td>
                    &nbsp;</td>
            </tr>
            
        </tbody>
             

            </table>
    </div>
</asp:Content>

